﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FirstFloor.ModernUI.Presentation;

namespace EasyInvoice.WPF.ViewModel
{
    class SettingsViewModel : NotifyPropertyChanged
    {
        private Uri selectedSource = new Uri("/Content/SettingsAppearance.xaml", UriKind.Relative);

        public Uri SelectedSource
        {
            get { return this.selectedSource; }
            set
            {
                this.selectedSource = value;
                this.OnPropertyChanged("SelectedSource");
            }
        }

        private LinkCollection tabLinks = new LinkCollection();

        public LinkCollection TabLinks
        {
            get { return this.tabLinks; }
            set
            {
                this.tabLinks = value;
                this.OnPropertyChanged("TabLinks");
            }
        }

        private void CreateTabLinks()
        {
            //Title Links
            var appearanceTabLink = new Link { DisplayName = "Appearance", Source = new Uri("/Content/SettingsAppearance.xaml", UriKind.Relative) };
            this.TabLinks.Add(appearanceTabLink);

            var exportTabLin = new Link { DisplayName = "Export", Source = new Uri("/Content/SettingsExport.xaml", UriKind.Relative) };
            this.TabLinks.Add(exportTabLin);

            var emailTabLink = new Link { DisplayName = "Email", Source = new Uri("/Content/SettingsEmail.xaml", UriKind.Relative) };
            this.TabLinks.Add(emailTabLink);

            var settingsTabLink = new Link { DisplayName = "Options", Source = new Uri("/Content/SettingsOptions.xaml", UriKind.Relative) };
            this.TabLinks.Add(settingsTabLink);

            var databaseTabLink = new Link { DisplayName = "Database", Source = new Uri("/Content/SettingsDatabase.xaml", UriKind.Relative) };
            this.TabLinks.Add(databaseTabLink);
            
        }

        public SettingsViewModel()
        {
            this.CreateTabLinks();
        }
    }
}
